﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Wuc_ProductEditMenu.ascx.cs" Inherits="Cn.Cellula.Website.Admin.Product.Wuc_ProductEditMenu" %>
<div id="WucProductEditBar" class="product_add_flow_bar">
</div>
<script type="text/javascript">
    var ProductEditMenuFunc = function(){
        var __PEI = function(){
            this.url = "";
            this.title = "";
        };
        var __pk = null;
        var __data = new Array();
        var __box = null;
        var __showMenu = function(){
            var _str = new Array();
            _str.push('<table><tr>');
            for(var i=0;i<__data.length;i++){
                if(i>0)
                    _str.push('<td>|</td>');
                if(window.location.href.toLowerCase().indexOf(__data[i].url.toLowerCase())!=-1){
                    _str.push('<td class="product_edit_menu_item_a"><a href="'+__data[i].url+'?id='+__pk+'">'+__data[i].title+'</a></td>');
                }else{
                    _str.push('<td class="product_edit_menu_item"><a href="'+__data[i].url+'?id='+__pk+'">'+__data[i].title+'</a></td>');
                }
            }
            _str.push('</tr></table>');
            __box.innerHTML = _str.join('');
        };
        
        this.display = function(rBoxId,rPk){
            __box = $("#"+rBoxId);
            __pk = rPk;
            __init();
            __showMenu();
        };
        var __init = function(){
            var _pei = new __PEI();
            _pei.url = "Admin/Product/Edit.aspx";
            _pei.title = "基本属性";
            __data.push(_pei);
            var _pei = new __PEI();
            _pei.url = "Admin/Product/EditAtlInfo.aspx";
            _pei.title = "模板属性";
            __data.push(_pei);
            var _pei = new __PEI();
            _pei.url = "Admin/Product/EditSaleInfo.aspx";
            _pei.title = "销售属性";
            __data.push(_pei);
            _pei = null;
            
        };
    };
    var productEditMenuFunc = new ProductEditMenuFunc(); 
    productEditMenuFunc.display("WucProductEditBar",'<%=Request.QueryString["id"] %>');   
</script>
